package com.szgr.baoyin.model;


import android.support.v4.app.Fragment;

import java.io.Serializable;

/**
 * Created by yang on 15/11/17.
 */
public class BYFragment implements Serializable {
    public BYFragment(int tag,Fragment fragment){
        this.tag = tag;
        this.fragment = fragment;
    }
    private Fragment fragment;
    private int tag;


    public Fragment getFragment() {
        return fragment;
    }

    public void setFragment(Fragment fragment) {
        this.fragment = fragment;
    }

    public int getTag() {
        return tag;
    }

    public void setTag(int tag) {
        this.tag = tag;
    }

    @Override
    public boolean equals(Object o) {
        if(o instanceof BYFragment){
            BYFragment byFragment = (BYFragment) o;
            if(getTag() == byFragment.getTag()){
                return true;
            }
        }
        return false;
    }
}
